package router

import (
	"github.com/gin-gonic/gin"
	"practice/config"
	"practice/internal/api/user"
	"practice/tools"
)

func UserRouter(router *gin.RouterGroup) {
	userModel := router.Group("user")
	{
		userModel.POST("register", user.Register)
		userModel.POST("login", user.Login)
		userModel.Use(tools.JWTAuth(config.AppConfig.Jwt.Key))
		userModel.POST("parse", user.ParseToken)
	}
}
